<template>
	<view class="container">
		<view class="header"><image src="../../static/2.png" mode=""></image></view>
		<view class="biaoti">2021{{ this.policy_city }}隔离最新政策(官方最新)</view>
		<view class="lishi">
			<view class="left">{{ this.policy_time }}</view>
			<!-- 需要跳转 -->
			<view class="right">更新历史</view>
		</view>
		<view class="neirong">
			<!-- <view class="top">
				一、对于在湖北入境的人员，实施“14+14”的健康管理措施。即14天集中隔离医学观察，期间进行2次核酸检测和1次抗体检测;集中隔离医学观察期满后再实施14天居家医学观察，期间进行两次核酸检测。入境人员隔离点应在隔离对象隔离期满前3天，将隔离人员相关信息通知其旅居目的地新冠肺炎疫情防控指挥部，以便当地落实居家医学观察。
			</view>
			<view class="bottom">
				二、对于非湖北入境的人员，在外省份已经集中隔离医学观察满14日，来(返)鄂后继续实施14天(从集中隔离医学观察期满起算)居家医学观察，期间进行2次核酸检测。
			</view> -->
			<view class="neirong">{{ this.policy_list }}</view>
		</view>
		<view class="aritcl-1">
			<view class="once">数据来源(可点击,数据来源列表)</view>
			<view class="twice">{{ this.policy_city }}城市疫情防控指挥中心</view>
		</view>
		<view class="ad">
			<view class="first"><image src="../../static/erwei.jpg" mode=""></image></view>
			<view class="second">
				<view class="ad-first"><text>关注二维码即可查询更多政策</text></view>
				<view class="ad-second">腾讯规定,只有关注公众号才能推送隔离政策变化提醒</view>
			</view>
		</view>
		<view class="require">免责说明:本页面信息仅提供参考,数据来源于官方.如要前往某地,可咨询当地社区办事处或当地政府.</view>
		<view class="footer">
			<view class="ft-left"><text url="#" @click="shareBtn()">分享</text></view>
			<view class="ft-right"><text url="#" @click="requireBtn()">信息反馈</text></view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			policy: '',
			policy_city: '',
			policy_time: '',
			policy_list: ''
		};
	},
	onLoad: function(option) {
		// this.getDetailes();
		let policy = option.policy;
		// let policy_code = policy.code;
		// console.log(policy, "从主页面传过来的数据")
		// console.log(policy_code, "从主页面传过来的数据code")
		this.getDetailes(policy);
	},
	methods: {
		shareBtn(){
			let that = this;
			that.getProvincToM();
			setTimeout(function(){uni.navigateTo({
				// url:"index4?policy=" + encodeURIComponent(JSON.stringify(this.policy))
				url:"share?policy=" + that.ccodeTo +"&share_name=" + that.fromName +"&share_names=" + that.toName
			});
			}, 500)
		},
		requireBtn() {
			uni.navigateTo({
				url: 'input'
			});
		},
		getDetailes(policy) {
			uni.request({
				url: 'http://epidemic.site.ximengnaikang.com/api/v1/city/policy',
				method: 'POST',
				data: {
					city_code: policy
				},
				header: {
					'Content-Type': 'application/json'
				},
				success: res => {
					this.policy_all = res.data.data;
					// console.log(this.policy_all, 'index2加载过来的内容');
					this.policy_city = this.policy_all.city;
					this.policy_time = this.policy_all.leave_policy_date;
					this.policy_list = this.policy_all.back_policy;
				}
			});
		},
	}
};
</script>

<style>
.container {
	width: 375px;
	/* height: 198px; */
	height: 100%;
}
.header image {
	width: 375px;
	height: 198px;
}
.biaoti {
	/* width: 345px;
		height: 63px; */
	font-size: 24px;
	font-family: Source Han Sans CN;
	font-weight: 500;
	line-height: 39px;
	color: #333333;
	/* margin: 5px auto; */
	padding: 5px 15px;
}
.lishi {
	height: 14px;
	width: 345px;
	margin: 15px auto;
	display: flex;
	justify-content: space-between;
}
.lishi .left {
	width: 97px;
	height: 12px;
	font-size: 12px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 39px;
	color: #999999;
	opacity: 1;
}
.lishi .right {
	width: 56px;
	height: 14px;
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 500;
	line-height: 39px;
	color: #23459d;
	opacity: 1;
}
.neirong {
	width: 345px;
	/* height: 245px; */
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 21px;
	color: #333333;
	opacity: 1;
	margin: 19px auto;
	overflow: hidden; /*隐藏溢出的文本  */
	text-overflow: ellipsis;
	word-break: break-all; /*自动换行*/
	-webkit-line-clamp: 12; /*显示的行数*/
	-moz-box-orient: vertical; /*从上到下自动排列子元素*/
	-webkit-box-orient: vertical;
	display: -webkit-box;
}
.neirong .top {
	margin-bottom: 20px;
}
.aritcl-1 {
	height: 35px;
	width: 345px;
	margin: 0 auto;
	position: relative;
}
.aritcl-1 .once {
	width: 200px;
	height: 15px;
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 21px;
	color: #333333;
	opacity: 1;
	position: absolute;
	right: 0;
	/* bottom: 0; */
	top: 0;
}
.aritcl-1 .twice {
	/* width: 180px; */
	height: 14px;
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 21px;
	color: #333333;
	opacity: 1;
	position: absolute;
	right: 0;
	bottom: 0;
}
.ad {
	width: 345px;
	height: 118px;
	background-image: url(../../static/ad.png);
	opacity: 1;
	border-radius: 12px;
	margin: 30px auto 10px;
	display: flex;
	justify-content: space-around;
	align-items: center;
}
.ad .first image {
	width: 92px;
	height: 92px;
	background: rgba(0, 0, 0, 0);
	opacity: 1;
	margin-top: 5px;
}
.ad .second {
	height: 92px;
	display: flex;
	flex-direction: column;
	justify-content: space-around;
}
.ad .second .ad-first {
	/* width: 207px;
		height: 32px; */
	border: 1px solid #ffffff;
	opacity: 1;
	border-radius: 170px;
	text-align: center;
	line-height: 32px;
}
.ad .second .ad-first text {
	/* width: 182px;
		height: 14px; */
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 24px;
	color: #ffffff;
	opacity: 1;
}
.ad .second .ad-second {
	width: 195px;
	height: 32px;
	font-size: 12px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 20px;
	color: #ffffff;
	opacity: 1;
	text-align: center;
}
.require {
	/* width: 345px; */
	height: 100px;
	font-size: 12px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 18px;
	color: #999999;
	opacity: 1;
	/* 		margin: 0 auto; */
	/* margin-bottom: 100px; */
	padding: 0 20px;
}
.footer {
	/* margin-bottom: 70px; */
	position: fixed;
	bottom: 0;
	width: 375px;
	height: 50px;
	background: #ffffff;
	border: 1px solid #eeeeee;
	opacity: 1;
	display: flex;
	justify-content: space-around;
	align-items: center;
	text-align: center;
}
.footer .ft-left {
	width: 130px;
	height: 40px;
	background: #23459d;
	opacity: 1;
	border-radius: 20px;
	line-height: 40px;
}
.footer .ft-right {
	width: 130px;
	height: 40px;
	background: #23459d;
	opacity: 1;
	border-radius: 20px;
	line-height: 40px;
}
.footer .ft-left text {
	width: 32px;
	height: 16px;
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 14px;
	color: #ffffff;
	opacity: 1;
}
.footer .ft-right text {
	width: 32px;
	height: 16px;
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 14px;
	color: #ffffff;
	opacity: 1;
}
</style>
